home *** CD-ROM | disk | FTP | other *** search
- Date: Wed, 8 Jun 94 13:44 CDT
- From: ekl@sdf.lonestar.org (Evan K. Langlois)
- To: gem-list@world.std.com
- Subject: GEm Tip
- Precedence: bulk
-
-
- Here is a small tip for those of you still using standard RSC files for
- dialogs. Some of you have wanted more color in your dialogs, but find you
- have to hack alot in the program code to adjust colors to be sure the
- dialog is readable in mono or lower-color modes.
-
- There is a little trick you can do to get all 16 colors in any dialog and
- have it perfectly readable in ALL modes. And it looks fine in mono too!
- What you do is set the dialog background color to the opposite color
- that you want it, now set the SELECTED bit, but do NOT set the selectable
- bit. The colors will inverse back to the original that you wanted in
- the first place. Now save the RSC. When you load it under MONO, normally,
- any color above 0 (WHITE) becomes black, giving you black on black, and
- you can't read it, but the background is SELECTED, so it inverts to white
- and you can read it like a normal dialog.
-
- Buttons are a bit harder because they invert and your text and background
- colors can't be set separately, however, you can stack text of any color
- on top of a button of any color. This allows you to set the attributes
- for selected and selectability separately for the button, and then the
- above trick will work for the object.
-
- Try it, you can get some really nice looking 16 color dialogs (actually
- 4 or 5 colors per dialog, but you can use all 16 in the program, finding
- a use for all 16 in one dialog is tough). This works and your program
- doesn't have to do any fix-ups. It should work in a window, or with
- form-do or with custom handlers.
-
-